<template>
  <div class="give-address-wrap">
    <div>{{value(row)}}</div>
    <div v-for="(item, index) in list"
         :key="index">{{item}}</div>
  </div>
</template>

<script>
export default {
  name: 'GiveAddress',
  props: {
    row: {
      type: Object,
      default: () => { }
    }
  },
  computed: {
    value () {
      return row => {
        if (row?.distinctFromAddress?.length) {
          return `${this.row?.distinctFromAddress?.length}提`;
        }
        if (row?.distinctToAddress?.length) {
          return `${this.row?.distinctToAddress?.length}送`;
        }
      }
    },
    list () {
      return row => {
        if (row?.distinctFromAddress?.length) {
          return this.row?.distinctFromAddress
        }
        if (row?.distinctToAddress?.length) {
          return this.row?.distinctToAddress
        }
      }
    }
  }
}
</script>

<style>
</style>